<template>
	<view class="content">
		<button @click="buttonTap">跳转</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				src: ''
			}
		},
		onLoad() {
			const that = this;
			wx.login({
				success:function(result) {
					console.log(result)
					wx.getUserInfo({
						desc: '正在获取',
						success(result) {
							console.log(result);
							that.src = result.userInfo.avatarUrl
						}	
					})
				}
			})
		},
		methods: {
			getPhoneNumber(e) {
				console.log(e)
				console.log(wx.canIUse('button.open-type.getUserInfo'))
				uni.getSetting({
					success: ({ authSetting }) => {
						console.log(authSetting)
					},
					fail: (error) => {}
				})
				// uni.navigateTo({
				// 	url: '../poster-example/poster-example'
				// })
				uni.navigateTo({
					url: '../poster/poster'
				})
				
			},
			setClipBoard() {
				uni.getClipboardData({
					success: (result) => {
						console.log(result)
						uni.setClipboardData({
							data: `
								${result.data}
								// 版权归属@copyrightxxxxx	
							`,
							success: (result) => {
								console.log(result)
							},
							fail: (error) => {
								console.log(error)
							}
						})
					},
					fail: (error) => {}
				})
				
			},
		buttonTap() {
			this.$Router.push({
				name:'MD',
				params:{
					type: 'testA'
				}
			})
		}
		},
	}
</script>

<style>
	.content {
		/* display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center; */
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	
	.avatar {
		margin: 0 20rpx;
		padding: 0 20rpx;
		display: flex;
		height: 100rpx;
		align-items: center;
		justify-content: space-between;
	}
	.userinfo-avatar {
		border-radius: 50%;
		overflow: hidden;
		width: 80rpx;
		height: 80rpx;
	}
	.points {
		padding: 10rpx 5rpx;
		background-color: orange;
		color: #fff;
		font-size: 20rpx;
	}
</style>
